<!DOCTYPE html>
<html class="no-js" lang="zxx" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <!-- Google Fonts Includes -->
    <link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700" rel="stylesheet">
    <!-- Favi icon -->
    <link rel="shortcut icon" type="image/x-icon" href="/reception/images/favicon.ico">
    <!-- bootstrap v3.3.6 css -->
    <link rel="stylesheet" href="/reception/css/assets/bootstrap.min.css">
    <!-- animate css -->
    <link rel="stylesheet" href="/reception/css/assets/animate.css">
    <!-- Button Hover animate css -->
    <link rel="stylesheet" href="/reception/css/assets/hover-min.css">
    <!-- jquery-ui.min css -->
    <link rel="stylesheet" href="/reception/css/assets/jquery-ui.min.css">
    <!-- meanmenu css -->
    <link rel="stylesheet" href="/reception/css/assets/meanmenu.min.css">
    <!-- owl.carousel css -->
    <link rel="stylesheet" href="/reception/css/assets/owl.carousel.min.css">
    <!-- slick css -->
    <link rel="stylesheet" href="/reception/css/assets/slick.css">
    <!-- chosen.min-->
    <link rel="stylesheet" href="/reception/css/assets/jquery-customselect.css">
    <!-- font-awesome css -->
    <link rel="stylesheet" href="/reception/css/assets/font-awesome.min.css">
    <!-- magnific Css -->
    <link rel="stylesheet" href="/reception/css/assets/magnific-popup.css">
    <!-- Preloader css -->
    <link rel="stylesheet" href="/reception/css/assets/preloader.css">
    <!-- custome css -->
    <link rel="stylesheet" href="/reception/css/style.css">
    <!-- responsive css -->
    <link rel="stylesheet" href="/reception/css/responsive.css">
    <link rel="stylesheet" href="/reception/css/master.css">

    <!--datepicker-->
    <link rel="stylesheet" href="/dist/bootstrap-datepicker.min.css">

    <!-- modernizr css -->
    <script src="/reception/js/vendor/modernizr-2.8.3.min.js"></script>

    <script src="/js/popper.min.js"></script>

    <!-- jquery latest version -->
    <script src="/reception/js/vendor/jquery-3.2.0.min.js"></script>
    <script src="/reception/js/vendor/modernizr-2.8.3.min.js"></script>
    <!-- bootstrap js -->
    <script src="/reception/js/bootstrap.min.js"></script>
    <!-- Vue -->
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js" type="text/javascript"></script>
    <!-- layer -->
    <script src="https://cdn.bootcss.com/layer/2.1/layer.js" type="text/javascript"></script>
    <!-- 删除确认框-->
    <script src="/vendors/bootbox/js/bootbox.js" type="text/javascript"></script>


    <!--datepicker-->
    <script src="/dist/bootstrap-datepicker.min.js"></script>
    <script src="/dist/bootstrap-datepicker.zh-CN.min.js"></script>
</head>
<body>
<div id="loader-wrapper">
    <div id="loader"></div>
    <div class="loader-section section-left"></div>
    <div class="loader-section section-right"></div>
</div>

<input type="hidden" id="userId" th:value="${session.user.userId}"/>
<header id="headerDiv">
    <div class="header_top_area">
        <div class="container">
            <div class="row">
                <div class="col-12 col-xs-12 col-sm-12 col-md-12 col-lg-12">
                    <div class="contact_wrapper_top" style="float: right;">
                        <ul class="header_top_contact">
                            <li>
                                <div class="book-btn" v-if="show">
                                    <a href="/hotel/registerHotel">成为商家</a>
                                </div>
                                <div class="book-btn" v-if="!show">
                                    <a href="/hotel/hotelManage">我的酒店</a>
                                </div>
                            </li>
                            <li>
                                <div class="book-btn">
                                    <a href="/hotel/myOrder">我的订单</a>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</header>
<!-- content -->
<div th:if="${template}">
    <div th:replace="${template}"></div>
</div>

<!-- ============================
            JavaScript Files
    ============================= -->


<!-- owl.carousel js -->
<script src="/reception/js/owl.carousel.min.js"></script>
<!-- slick js -->
<script src="/reception/js/slick.min.js"></script>
<!-- meanmenu js -->
<script src="/reception/js/jquery.meanmenu.min.js"></script>
<!-- jquery-ui js -->
<!--<script src="/reception/js/jquery-ui.min.js"></script>-->
<!-- wow js -->
<script src="/reception/js/wow.min.js"></script>
<!-- counter js -->
<script src="/reception/js/jquery.counterup.min.js"></script>
<!-- Countdown js -->
<script src="/reception/js/jquery.countdown.min.js"></script>
<!-- waypoints js -->
<script src="/reception/js/jquery.waypoints.min.js"></script>
<!-- Isotope js -->
<script src="/reception/js/isotope.pkgd.min.js"></script>
<!-- magnific js -->
<script src="/reception/js/jquery.magnific-popup.min.js"></script>
<!-- Image loaded js -->
<script src="/reception/js/imagesloaded.pkgd.min.js"></script>
<!-- chossen js -->
<script src="/reception/js/chosen.jquery.min.js"></script>
<!-- Jquery plugin -->
<script src="/reception/js/plugins.js"></script>
<!-- select2 js plugin -->
<script src="/reception/js/select2.min.js"></script>
<script src="/reception/js/colors.js"></script>
<!-- Jquery plugin -->
<script src="/reception/js/jquery-customselect.js"></script>
<!-- main js -->
<script src="/reception/js/custom.js"></script>
</body>
</html>
<script>
    var headerVue = new Vue({
        el: "#headerDiv",
        data: {
            show: true
        },
        methods: {
            initPage: function () {
                var self = this;
                var userId = $("#userId").val();
                $.ajax({
                    url: "/api/hotelMain/" + userId,
                    type: "get",
                    success: function (rs) {
                        console.log(rs);
                        if (rs != null && rs !== "") {
                            self.show = false;
                        }
                    },
                    error: function (rs) {
                        layer.alert(rs.responseText, {icon: 0});
                    }
                })
            }
        },
        created: function () {

        },
        mounted: function () {
            this.initPage();
        }
    })
</script>
